<template>
	<!-- #ifdef MP-WEIXIN -->
	<root-portal>
	<!-- #endif -->
	
	<u-popup :show="showRule"
						mode="bottom" 
						closeable
						@close="showRule = false"
						:customStyle="{'max-height':'1000rpx'}">
		<view class="u-text-center u-p-30">
			<text>平台规则</text>
		</view>
		<scroll-view scroll-y="true" style="max-height: 840rpx;">
		<view class="u-p-30">
			<u-parse :content="ruleInfo.ruleContent"></u-parse>
		</view>
		</scroll-view>
	</u-popup>
	
	<!-- #ifdef MP-WEIXIN -->
	</root-portal>
	<!-- #endif -->
</template>

<script>
	import {getRuleByType} from '@/api/rule.js'
	export default{
		data(){
			return {
				showRule: false,
				ruleInfo:{}
			}
		},
		methods:{
			
			/**
			 * 初始化
			 */
			init(){
				getRuleByType({
					ruleType: '1'
				}).then(res=>{
					let data = res.data
					if(data.length > 0){
						this.ruleInfo = data[0]
						this.showRule = true	
					}
				})
			}
		}
	}
</script>

<style>
</style>